package com.shsxt.model;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

public class Coupon extends BaseQuery {
	private String redeemCode;
	private String discountAmount;
	private String serviceType;
	private String state;
	@JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private String activationTime;
	private String phoneNumber;
	@JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private String finallyTime;
	private String useable;

	public String getUseable() {
		return useable;
	}
	public void setUseable(String useable) {
		this.useable = useable;
	}
	public Coupon(String redeemCode, String discountAmount, String serviceType, String state, String activationTime,
			String phoneNumber, String finallyTime, String useable) {
		super();
		this.redeemCode = redeemCode;
		this.discountAmount = discountAmount;
		this.serviceType = serviceType;
		this.state = state;
		this.activationTime = activationTime;
		this.phoneNumber = phoneNumber;
		this.finallyTime = finallyTime;
		this.useable = useable;
	}
	@Override
	public String toString() {
		return "Coupon [redeemCode=" + redeemCode + ", discountAmount=" + discountAmount + ", serviceType="
				+ serviceType + ", state=" + state + ", activationTime=" + activationTime + ", phoneNumber="
				+ phoneNumber + ", finallyTime=" + finallyTime + "]";
	}
	public Coupon() {
		super();
		// TODO Auto-generated constructor stub
	}
	public Coupon(String redeemCode, String discountAmount, String serviceType, String state, String activationTime,
			String phoneNumber, String finallyTime) {
		super();
		this.redeemCode = redeemCode;
		this.discountAmount = discountAmount;
		this.serviceType = serviceType;
		this.state = state;
		this.activationTime = activationTime;
		this.phoneNumber = phoneNumber;
		this.finallyTime = finallyTime;
	}
	public String getRedeemCode() {
		return redeemCode;
	}
	public void setRedeemCode(String redeemCode) {
		this.redeemCode = redeemCode;
	}
	public String getDiscountAmount() {
		return discountAmount;
	}
	public void setDiscountAmount(String discountAmount) {
		this.discountAmount = discountAmount;
	}
	public String getServiceType() {
		return serviceType;
	}
	public void setServiceType(String serviceType) {
		this.serviceType = serviceType;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getActivationTime() {
		return activationTime;
	}
	public void setActivationTime(Date evaluationTime) {
		this.activationTime = new SimpleDateFormat("yyyy-MM-dd").format(evaluationTime);
	}
	public String getPhoneNumber() {
		return phoneNumber;
	}
	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}
	public String getFinallyTime() {
		return finallyTime;
	}
	public void setFinallyTime(Date finallyTime) {
		this.finallyTime = new SimpleDateFormat("yyyy-MM-dd").format(finallyTime);
	}
	


}
